Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Crimson Nylium and Warped Nylium blocks #6481

Open
wants to merge 6 commits into
base: stable
Choose a base branch
from

Conversation

AzaleeX
Copy link

@AzaleeX AzaleeX commented Nov 3, 2024

Introduction

Crimson Nylium and Warped Nylium blocks added
image

Tests

I tested this PR by doing the following (tick all that apply):

  • Writing PHPUnit tests (commit these in the tests/phpunit folder)
  • Playtesting using a Minecraft client (provide screenshots or a video)
  • Writing a test plugin (provide the code and sample output)
  • Other (provide details)

Comment on lines +43 to +44
$lightAbove = $world->getFullLightAt((int) $this->position->x, (int) $this->position->y + 1, (int) $this->position->z);
if($lightAbove < 4 && $world->getBlockAt((int) $this->position->x, (int) $this->position->y + 1, (int) $this->position->z)->getLightFilter() >= 2){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to use getSide(Facing::UP)

Comment on lines +38 to +39
$supportBlock->getTypeId() === BlockTypeIds::CRIMSON_NYLIUM ||
$supportBlock->getTypeId() === BlockTypeIds::WARPED_NYLIUM ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to create a new Nylium tag for that is think


class RedMushroom extends Flowable{
use StaticSupportTrait;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apply only minimal change, this is unrelated to the PR "add Crimson Nylium".

Open an other PR if you want to change that.

Comment on lines +937 to +938
self::register("crimson_nylium", new GrassNylium(new BID(Ids::CRIMSON_NYLIUM), "Crimson Nylium", new Info(BreakInfo::pickaxe(0.4))));
self::register("warped_nylium", new GrassNylium(new BID(Ids::WARPED_NYLIUM), "Warped Nylium", new Info(BreakInfo::pickaxe(0.4))));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be good to store in an variable the break info

use pocketmine\block\utils\BlockEventHelper;
use pocketmine\item\Item;

class GrassNylium extends Opaque{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nylium or NetherNylium would be better.

@ipad54
Copy link
Contributor

ipad54 commented Nov 4, 2024

Bonemeal logic is missing.

Also, this PR should target minor-next branch, not stable.

@ShockedPlot7560
Copy link
Member

There is no block available for bone meal spreading, roots and fungus is missing

@ipad54
Copy link
Contributor

ipad54 commented Nov 4, 2024

roots and fungus is missing

Roots are implemented. https://github.com/pmmp/PocketMine-MP/blob/stable/src/block/NetherRoots.php

@@ -983,6 +984,7 @@ private function registerSimpleDeserializers() : void{
$this->mapSimple(Ids::TUFF_BRICKS, fn() => Blocks::TUFF_BRICKS());
$this->mapSimple(Ids::UNDYED_SHULKER_BOX, fn() => Blocks::SHULKER_BOX());
$this->mapSimple(Ids::WARPED_WART_BLOCK, fn() => Blocks::WARPED_WART_BLOCK());
$this->mapSimple(Ids::WARPED_NYLIUM, fn() => Blocks::WARPED_NYLIUM());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alphabetical order please

@@ -1060,6 +1061,7 @@ private function registerSimpleSerializers() : void{
$this->mapSimple(Blocks::TUFF(), Ids::TUFF);
$this->mapSimple(Blocks::TUFF_BRICKS(), Ids::TUFF_BRICKS);
$this->mapSimple(Blocks::WARPED_WART_BLOCK(), Ids::WARPED_WART_BLOCK);
$this->mapSimple(Blocks::WARPED_NYLIUM(), Ids::WARPED_NYLIUM);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same again here

@jasonw4331 jasonw4331 added Category: Gameplay Related to Minecraft gameplay experience Status: Waiting on Author Type: Enhancement Contributes features or other improvements to PocketMine-MP labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Gameplay Related to Minecraft gameplay experience Status: Waiting on Author Type: Enhancement Contributes features or other improvements to PocketMine-MP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants